﻿using System;
using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    
    [ServiceContract(Namespace = "http://HRMService")]
    public interface IRecruitment
    {
        [OperationContract]
        int Recruitment_Using(int RecruitmentID);

        [OperationContract]
        DataSet Recruitment_GetAll(int Year);

        [OperationContract]
        RecruitmentInfo Recruitment_GetInfo(int RecruitmentID);

        [OperationContract]
        DataSet Recruitment_GetList(out int ItemCount, string keyWord, int currentPage, int pageSize);

        [OperationContract]
        int Recruitment_Insert(RecruitmentInfo eInfo);

        [OperationContract]
        bool Recruitment_Update(RecruitmentInfo eInfo);

        [OperationContract]
        bool Recruitment_Delete(int RecruitmentID);

        [OperationContract]
        bool Recruitment_Exist(int RecruitmentID, string RecruitmentName);
    }
    [DataContract(Namespace = "http://HRMService")]
    public class RecruitmentInfo
    {
        #region VARIABLES

        int _ID;
        string _Name;
        DateTime _FromDate;
        DateTime _ToDate;
        string _Description;

        #endregion

        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        [DataMember]
        public DateTime FromDate
        {
            get { return _FromDate; }
            set { _FromDate = value; }
        }
        [DataMember]
        public DateTime ToDate
        {
            get { return _ToDate; }
            set { _ToDate = value; }
        }
       
        [DataMember]
        public string Description
        {
            get { return _Description; }
            set { _Description = value; }
        }

    }

}
